home *** CD-ROM | disk | FTP | other *** search
- Path: soap.news.pipex.net!pipex!usenet
- From: m.hendry@dial.pipex.com (Mathew Hendry)
- Newsgroups: comp.sys.amiga.misc
- Subject: Re: MUI 3.2
- Date: Thu, 15 Feb 96 02:05:26
- Organization: Private node.
- Distribution: world
- Message-ID: <19960215.477EF0.227C@ak156.du.pipex.com>
- References: <john.hendrikx.4d88@grafix.xs4all.nl> <9602110125.AA004i2@hectortd.demon.co.uk>
- NNTP-Posting-Host: ak156.du.pipex.com
- X-Newsreader: TIN [AMIGA 1.3 950726BETA PL0]
-
- Paul Copsey (paul@hectortd.demon.co.uk) wrote:
- : My env: contains 33226 bytes of files, but actually uses 138240 bytes
- : because of the way filesystems work. If I had Env: in Ram: (I use
- : statram, which has a block size of 512, as opposed to Ram:'s 1024)
- : then env: would swallow 247808 bytes.
- :
- : Even a 1 byte file in ram: will take 1k to store.
-
- I don't know where this idea keeps coming from. RAM: does NOT use a block
- system like floppy and hard disk filesystems (or StatRAM) - there is no need
- for it to do so, since RAM isn't organised in a "blocky" fashion.
-
- Try executing this little script:
-
- --- CUT HERE ---
-
- .key blah
- .bra {
- .ket }
-
- ; Damn, AmigaOS scripts are messy things ;)
-
- set ctr 1
-
- set endamount `avail total` ; make sure all variables are set before trying
- ; to get an exact figure.
- set startamount `avail total`
-
- lab loop
- echo >ram:testit_$ctr "0123456789" noline
- set ctr `eval $ctr + 1`
- if val $ctr not gt 100
- skip back loop
- endif
-
- set endamount `avail total`
-
- echo RAM consumed: `eval $startamount - $endamount`
-
- delete >nil: ram:testit_#?
-
- ---CUT HERE---
-
- This script writes 100 10 byte files to RAM: (deleting them afterwards, of
- course).
-
- The RAM used figure I get is 14400 bytes, or 144 bytes/file. 134 bytes/file
- isn't much of an overhead, and is certainly a lot less than that of StatRAM,
- which will "round up" file lengths to the next multiple of 512 bytes.
-
- I'd imagine that most of the overhead here is due to RAM: using a fixed length
- filename field (altering the length of the filenames doesn't seem to alter the
- amount of RAM used). Protection bits, filenotes etc. must also be
- stored, which adds a bit more.
-
- So, Paul, I'd recommend you move your ENV: assign to RAM:, to save a few of
- those precious bytes which StatRAM is stealing from you ;)
-
- -- Mat.
-